3.5.42 \(\int x^{-1-n-(-1+p) q} (b x^n+a x^q)^p \, dx\) [442]

Optimal. Leaf size=69 \[ \frac {b x^{-p q} \left (a+b x^{n-q}\right ) \left (b x^n+a x^q\right )^p \, _2F_1\left (2,1+p;2+p;1+\frac {b x^{n-q}}{a}\right )}{a^2 (1+p) (n-q)} \]

[Out]

b*(a+b*x^(n-q))*(b*x^n+a*x^q)^p*hypergeom([2, 1+p],[2+p],1+b*x^(n-q)/a)/a^2/(1+p)/(n-q)/(x^(p*q))

________________________________________________________________________________________

Rubi [A]
time = 0.06, antiderivative size = 69, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {2057, 272, 67} \begin {gather*} \frac {b x^{-p q} \left (a+b x^{n-q}\right ) \left (a x^q+b x^n\right )^p \, _2F_1\left (2,p+1;p+2;\frac {b x^{n-q}}{a}+1\right )}{a^2 (p+1) (n-q)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^(-1 - n - (-1 + p)*q)*(b*x^n + a*x^q)^p,x]

[Out]

(b*(a + b*x^(n - q))*(b*x^n + a*x^q)^p*Hypergeometric2F1[2, 1 + p, 2 + p, 1 + (b*x^(n - q))/a])/(a^2*(1 + p)*(
n - q)*x^(p*q))

Rule 67

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((c + d*x)^(n + 1)/(d*(n + 1)*(-d/(b*c))^m))
*Hypergeometric2F1[-m, n + 1, n + 2, 1 + d*(x/c)], x] /; FreeQ[{b, c, d, m, n}, x] &&  !IntegerQ[n] && (Intege
rQ[m] || GtQ[-d/(b*c), 0])

Rule 272

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 2057

Int[((c_.)*(x_))^(m_.)*((a_.)*(x_)^(j_.) + (b_.)*(x_)^(n_.))^(p_), x_Symbol] :> Dist[c^IntPart[m]*(c*x)^FracPa
rt[m]*((a*x^j + b*x^n)^FracPart[p]/(x^(FracPart[m] + j*FracPart[p])*(a + b*x^(n - j))^FracPart[p])), Int[x^(m
+ j*p)*(a + b*x^(n - j))^p, x], x] /; FreeQ[{a, b, c, j, m, n, p}, x] &&  !IntegerQ[p] && NeQ[n, j] && PosQ[n
- j]

Rubi steps

\begin {align*} \int x^{-1-n-(-1+p) q} \left (b x^n+a x^q\right )^p \, dx &=\left (x^{-p q} \left (a+b x^{n-q}\right )^{-p} \left (b x^n+a x^q\right )^p\right ) \int x^{-1-n-(-1+p) q+p q} \left (a+b x^{n-q}\right )^p \, dx\\ &=\frac {\left (x^{-p q} \left (a+b x^{n-q}\right )^{-p} \left (b x^n+a x^q\right )^p\right ) \text {Subst}\left (\int \frac {(a+b x)^p}{x^2} \, dx,x,x^{n-q}\right )}{n-q}\\ &=\frac {b x^{-p q} \left (a+b x^{n-q}\right ) \left (b x^n+a x^q\right )^p \, _2F_1\left (2,1+p;2+p;1+\frac {b x^{n-q}}{a}\right )}{a^2 (1+p) (n-q)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.14, size = 82, normalized size = 1.19 \begin {gather*} \frac {x^{-n+q-p q} \left (b x^n+a x^q\right )^p \left (1+\frac {a x^{-n+q}}{b}\right )^{-p} \, _2F_1\left (1-p,-p;2-p;-\frac {a x^{-n+q}}{b}\right )}{(-1+p) (n-q)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x^(-1 - n - (-1 + p)*q)*(b*x^n + a*x^q)^p,x]

[Out]

(x^(-n + q - p*q)*(b*x^n + a*x^q)^p*Hypergeometric2F1[1 - p, -p, 2 - p, -((a*x^(-n + q))/b)])/((-1 + p)*(n - q
)*(1 + (a*x^(-n + q))/b)^p)

________________________________________________________________________________________

Maple [F]
time = 0.20, size = 0, normalized size = 0.00 \[\int x^{-1-n -\left (-1+p \right ) q} \left (b \,x^{n}+a \,x^{q}\right )^{p}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^(-1-n-(-1+p)*q)*(b*x^n+a*x^q)^p,x)

[Out]

int(x^(-1-n-(-1+p)*q)*(b*x^n+a*x^q)^p,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1-n-(-1+p)*q)*(b*x^n+a*x^q)^p,x, algorithm="maxima")

[Out]

integrate((b*x^n + a*x^q)^p*x^(-(p - 1)*q - n - 1), x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1-n-(-1+p)*q)*(b*x^n+a*x^q)^p,x, algorithm="fricas")

[Out]

integral((b*x^n + a*x^q)^p*x^(-(p - 1)*q - n - 1), x)

________________________________________________________________________________________

Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**(-1-n-(-1+p)*q)*(b*x**n+a*x**q)**p,x)

[Out]

Exception raised: SystemError >> excessive stack use: stack is 6438 deep

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1-n-(-1+p)*q)*(b*x^n+a*x^q)^p,x, algorithm="giac")

[Out]

integrate((b*x^n + a*x^q)^p*x^(-(p - 1)*q - n - 1), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (b\,x^n+a\,x^q\right )}^p}{x^{n+q\,\left (p-1\right )+1}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x^n + a*x^q)^p/x^(n + q*(p - 1) + 1),x)

[Out]

int((b*x^n + a*x^q)^p/x^(n + q*(p - 1) + 1), x)

________________________________________________________________________________________